package com.macro.mall.tiny.modules.cms.controller;


import com.macro.mall.tiny.common.api.CommonResult;
import com.macro.mall.tiny.modules.cms.model.CmsSubject;
import com.macro.mall.tiny.modules.cms.service.CmsSubjectService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 专题表 前端控制器
 * </p>
 *
 * @author macro
 * @since 2024-09-03
 */
@RestController
@RequestMapping("/subject")
public class CmsSubjectController {

    @Autowired
    private CmsSubjectService cmsSubjectService;

    @ApiOperation("获取全部专题")
    @RequestMapping("/listAll")
    public CommonResult<List<CmsSubject>> listAll() {
        return CommonResult.success(cmsSubjectService.listAll());
    }

}

